set more off

use "elections", clear
collapse (count) contested, by(county_name muni_name)
gen haselection = contested > 0 & !mi(contested)

merge m:m county_name using "reassessments"
keep if year == 2000
unique county_name muni_name if _m == 3

drop _m
duplicates drop swis_code, force

merge 1:m swis_code using "switchers"
keep if year == 2000
duplicates drop swis_code, force
drop _m

replace hasel = 0 if hasel == .
merge 1:m swis_code using "switchers_map"

#delimit;

spmap
	hasel using "coords"
	,
		id(_id) 
		fcol(white black white)
		mocol(black white black)
		ocol(black white black)
		clmethod(unique)
		ndfcolor(white)
		legend(off)
		;

#delimit cr

gr export "figure A6.eps", replace

